package com.example.myone;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

/**
 * Created by Administrator on 2017/6/16 0016.
 */

public class LoginActivity extends AppCompatActivity{

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        SharedPreferences sharedPreferences=getSharedPreferences("keytwo",MODE_PRIVATE);
        boolean b=  sharedPreferences.getBoolean("name",false);

        if (b)
        {
            startActivity(new Intent(this,WelcomeActivity.class));

        }
        else
        {
            startActivity(new Intent(this,GuideActivity.class));

        }

    }
}
